{% extends 'front/base.html' %}

{% block content %}
<div class="post-main">
    <div class="post-title">
        <h1>{{post_info.title}}</h1>
    </div>
    <div class="post-info">
        <div class="post-user">
            作者：{{username}}
        </div>
        <div class="post-time">
            发表于：{{post_info.post_time|time_filter}}
        </div>
        {% if current_user.is_anonymous %}
        {% else %}
        <div class="post-edit">
            <a href="{{ url_for('post.edit_post',post_id=post_info.id) }}">编辑</a>
        </div>
        {% endif %}
    </div>
    <div class="post-body">
        <!--        不转义富文本中的html标签-->
        <p>{{post_info.body|safe}}</p>
    </div>
</div>

<!--评论-->
{% include 'common/comments.html' %}

{% endblock %}